<%@page import="team02.server.bean.TestBean"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<jsp:useBean id="testBean"
	class="team02.server.bean.TestBean" scope="page"></jsp:useBean>
<script>
function error(){
	alert("削除できませんでした");
	window.location.replace("test_manager.t02");
}
</script>
<%
//権限をチェック
if(userBean.getAccessLevel()<2||userBean.getAccessLevel()>3||request.getMethod()=="GET"){
	response.sendRedirect("404.html");
	return;
}
String testId=request.getParameter("selected_id");
testBean.setId(Integer.parseInt( testId));
if(testBean.delete()==0)
{
	response.sendRedirect("test_manager.t02");
}
else{
	%>
<script>
error();
</script>
	<%
}
%>